<?php

use Illuminate\Database\Seeder;
use App\Admin;


class AdminSeeder extends Seeder{


    public function run(Request $request){

        Admin::firstOrCreate([
            'username' => 'admin',
            'password' => bcrypt('123456'),
            'status'   => 1
        ]);

        \App\User::firstOrCreate([
            'username' => 'admin',
            'password' => bcrypt('123456'),
            'user_key' => md5(rand(1000,9999) . time()),
            'role' => 1,
            'status'   => 1,
            'reg_ip'   => '127.0.0.1',
        ]);
    }

}
